package com.dg11185.nearshop.net;

import com.dg11185.libs.network.http.client.HttpRequest;

public abstract class HttpCacheRequest<T> extends HttpRequest<T> {

    /** 该接口的数据有效期,以毫秒为单位,默认时间wifi两小时、3G两天，数据缓存时间为（当前时间-上次修改时间） */
    private long wifiTimeSpan = 2*3600*1000;

    private long _3GTimeSpan = 2*24*3600*1000;

    /** 一个接口有可选参数时，需要给改接口单独建文件夹方便删除 */
    private boolean isCreateFloder = false;

    public HttpCacheRequest(String address, String method) {
        super(address, method);
    }

    public long getWifiTimeSpan() {
        return wifiTimeSpan;
    }

    public void setWifiTimeSpan(long wifiTimeSpan) {
        this.wifiTimeSpan = wifiTimeSpan;
    }

    public long get_3GTimeSpan() {
        return _3GTimeSpan;
    }

    public void set_3GTimeSpan(long _3gTimeSpan) {
        this._3GTimeSpan = _3gTimeSpan;
    }

    public boolean getIsCreateFloder() {
        return isCreateFloder;
    }

    public void setIsCreateFloder(boolean createFloder) {
        this.isCreateFloder = createFloder;
    }

}
